﻿<UserControl x:Class="LOLVideo.Views.SelectHerosSkinDialogView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:flow="clr-namespace:ExtendPropertyLib.XAML.UI.CoverFlow"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        xmlns:Ex="clr-namespace:ExtendPropertyLib.XAML.Converters;assembly=ExtendPropertyLib.WPF"
        mc:Ignorable="d"
        d:DesignWidth="1215" d:DesignHeight="717">
    <UserControl.Resources>
        <Storyboard x:Key="imageAnimation">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="img">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Ex:BoolToVisibilityConverter x:Key="btv"/>
    </UserControl.Resources>
  
    <Grid Width="1215" Height="717">
    
        <Image x:Name="img" Source="{Binding BackgroundImage}"/>
        <flow:FlowControl x:Name="flow" Index="{Binding SelectedIndex}" ItemsSource="{Binding Skins}" Height="522" Width="886" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="42,0,0,29" >
           
        </flow:FlowControl>
        <TextBlock HorizontalAlignment="Left" Margin="132,67,0,0" TextWrapping="Wrap" Text="{Binding Hero.Name}" VerticalAlignment="Top" FontSize="38" FontWeight="Bold">
            <TextBlock.Effect>
                <DropShadowEffect/>
            </TextBlock.Effect>
        </TextBlock>
        <TextBlock HorizontalAlignment="Left"  Margin="132,118,0,0" TextWrapping="Wrap" Text="{Binding Hero.Title}" VerticalAlignment="Top" FontSize="28" FontWeight="Bold">
            <TextBlock.Effect>
                <DropShadowEffect/>
            </TextBlock.Effect>
            <TextBlock.Foreground>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF7ECDDC" Offset="0"/>
                    <GradientStop Color="#FF82B5C1" Offset="1"/>
                    <GradientStop Color="#FF0C83B0" Offset="0.484"/>
                </LinearGradientBrush>
            </TextBlock.Foreground>
        </TextBlock>
        <TextBlock HorizontalAlignment="Left" Margin="467,655,0,0" TextWrapping="Wrap" Text="{Binding SkinName}" VerticalAlignment="Top" FontSize="18" FontWeight="Bold">
            <TextBlock.Effect>
                <DropShadowEffect/>
            </TextBlock.Effect>
        </TextBlock>
        <Button Name="OnApplySkin"  Content="使用皮肤" Width="152" Margin="1025,646,38,29"  BorderBrush="#FF727272" FontSize="14" FontWeight="Bold" Foreground="White" FontFamily="Microsoft YaHei" TextOptions.TextRenderingMode="ClearType" >
            <Button.ToolTip>
                <TextBlock Text="请在选择完皮肤后，退出本窗口应用此皮肤效果，可以选择多个人物的皮肤后一起应用。选择皮肤过程可能会等待一段时间，请耐心等待。"/>
            </Button.ToolTip>
                <Button.Effect>
                <DropShadowEffect ShadowDepth="2" BlurRadius="4" Direction="308" Opacity="0.965"/>
            </Button.Effect>
            <Button.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF402B39" Offset="0"/>
                    <GradientStop Color="#FF764E55" Offset="1"/>
                    <GradientStop Color="#FF3C2A35" Offset="0.46"/>
                </LinearGradientBrush>
            </Button.Background>
        </Button>
        <Grid Panel.ZIndex="999" Background="#FF0F0F0F" Opacity=".75" Visibility="{Binding IsBusy,Converter={StaticResource btv}}">
            <Grid VerticalAlignment="Center" Height="300" Background="#FF0C5CAC">
                <StackPanel VerticalAlignment="Center" Height="200" >
                    <Controls:ProgressRing IsActive="True" Height="100" Width="100" Foreground="White" Margin="0,20,0,0"/>
                    <TextBlock Text=""/>
                    <TextBlock Margin="16" Text="正在生成皮肤效果，请耐心等待，请不要关闭此窗口。提示每个英雄只能生效一种皮肤效果哦！" HorizontalAlignment="Center"  FontWeight="Bold" FontSize="22" Foreground="#FFFFF3F3" FontFamily="Microsoft YaHei"/>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
